#!/usr/bin/env node

const log4js = require('log4js');
const fs = require('fs')

//log4js.configure(JSON.parse(fs.readFileSync('./log4js.json', 'utf-8')));
var obj = JSON.parse(fs.readFileSync('./log4js.json', 'utf-8'));
obj.appenders.dataFile.filename += process.pid + '_'
log4js.configure(obj);
//log4js.configure('./log4js.json');
//const logger = log4js.getLogger('stressTest');
const logger = log4js.getLogger();
console.log = logger.info.bind(logger); // do the same for others - console.debug, etc.

logger.trace('trace');
logger.debug('debug');
logger.info('info');
logger.warn('warn');
logger.error('error');
logger.fatal('fatal');

console.log("xxxxxxxxxxxxxxxxxxxxxxxxx");
